﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/_FrontEnd_Index.Master" AutoEventWireup="true" CodeBehind="ChiTietSanPham.aspx.cs" Inherits="MyWeb.GUI.User.ChiTietSanPham" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
     <script>
         $(function () {
             $('.txtquantity').forceNumeric();
         });
         $.fn.forceNumeric = function () {
             return this.each(function () {
                 $(this).keydown(function (e) {
                     var key = e.which || e.keyCode;

                     if (!e.shiftKey && !e.altKey && !e.ctrlKey &&
                         // numbers
                         key >= 48 && key <= 57 ||
                         // Numeric keypad
                         key >= 96 && key <= 105 ||
                         // comma, period and minus, . on keypad
                         key == 190 || key == 188 || key == 109 || key == 110 ||
                         // Backspace and Tab and Enter
                         key == 8 || key == 9 || key == 13 ||
                         // Home and End
                         key == 35 || key == 36 ||
                         // left and right arrows
                         key == 37 || key == 39 ||
                         // Del and Ins
                         key == 46 || key == 45) {
                         $('#lbPhoneError').hide();
                         $('#phonesCus').removeClass('parsley-error');
                         return true;
                     }
                     return false;
                 });
             });
         }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
				
				<aside class="span3">
				<div class="aside-inner">
					<div class="special">
						<div class="titleHeader clearfix">
							<h3>Sản phẩm bán chạy</h3>
						</div><!--end titleHeader-->
						<ul class="vProductItemsTiny">
                            <asp:Repeater ID="rphotproduct" runat="server">
                                <ItemTemplate>
                                    <li class="span4 clearfix">
                                        <div class="thumbImage">
                                            <a href="ChiTietSanPham.aspx?MaSP=<%#Eval("MaDienThoai") %>">
                                                <img style="width:92px; height:92px;" src="/Content/HinhSanPham/<%#Eval("HinhDaiDien") %>" alt="<%#Eval("TenDienThoai") %>"></a>
                                        </div>
                                        <div class="thumbSetting">
                                            <div class="thumbTitle">
                                                <a href="ChiTietSanPham.aspx?MaSP=<%#Eval("MaDienThoai") %>" class="invarseColor"><%#Eval("TenDienThoai") %>
                                                </a>
                                            </div>
                                            <div class="thumbPrice">
                                                <span><%#Eval("Gia","{0:0,0,0}") %>&nbsp;VNĐ</span>
                                            </div>
                                        </div>
                                    </li>
                                </ItemTemplate>
                            </asp:Repeater>
						</ul>
					</div><!--end special-->



					<div class="special">
						<div class="titleHeader clearfix">
							<h3>Sản phẩm mới</h3>
						</div><!--end titleHeader-->
						<ul class="vProductItemsTiny">
                            <asp:Repeater ID="rpNewProduct" runat="server">
                                <ItemTemplate>
							            <li class="span4 clearfix">
								            <div class="thumbImage">
									            <a href="ChiTietSanPham.aspx?MaSP=<%#Eval("MaDienThoai") %>""><img style="width:92px; height:92px;" src="/Content/HinhSanPham/<%#Eval("HinhDaiDien") %>" alt="<%#Eval("TenDienThoai") %>"></a>
								            </div>
								            <div class="thumbSetting">
									            <div class="thumbTitle">
										            <a href="ChiTietSanPham.aspx?MaSP=<%#Eval("MaDienThoai") %>" class="invarseColor"><%#Eval("TenDienThoai") %>
										            </a>
									            </div>
									            <div class="thumbPrice">
										            <span><%#Eval("Gia","{0:0,0,0}") %>&nbsp;VNĐ</span>
									            </div>
								            </div>
							            </li>
                                    </ItemTemplate>
                            </asp:Repeater>
						</ul>
					</div><!--end special-->

				</div><!--end aside-inner-->
				</aside><!--end span3-->


				<div class="span9">
					<div class="row">

                        <div class="product-details clearfix">
                            <asp:Repeater ID="rpLoadCT" runat="server" OnItemCommand="rpLoadCT_ItemCommand" OnItemDataBound="rpLoadCT_ItemDataBound" >
                                <ItemTemplate>
                                    <div class="span5">
                                        <div class="product-title">
                                            <h4>
                                                <%#Eval("TenDienThoai") %></h4>
                                        </div>
                                        <div class="product-img">
                                            <a class="fancybox" href="/Content/HinhSanPham/<%#Eval("HinhDaiDien") %>">
                                                <img src="/Content/HinhSanPham/<%#Eval("HinhDaiDien") %>" alt='<%#Eval("TenDienThoai") %>' style="width:372px;height:370px;" /></a>
                                        </div>
                                        <!--end product-img-->
                                        <asp:Repeater ID="rpthumbnail" runat="server">
                                            <ItemTemplate>
                                                <div class="product-img-thumb">

                                                    <a class="fancybox" href="/Content/HinhSanPham/<%#Eval("TenHinh") %>">
                                                        <img src="/Content/HinhSanPham/<%#Eval("TenHinh") %>" alt="" style="width:68px;height:60px;" /></a>
                                                </div>
                                                <!--end flexslider-thumb-->
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </div>
                                    <!--end span5-->
                                
							<div class="span4">
                                        <div class="product-set">
                                            <div class="product-price">
                                                <span>
                                                    <%#Eval("Gia") %></span>
                                            </div>
                                            <!--end product-price-->
                                            <div class="product-info">
                                                <dl class="dl-horizontal">
                                                    <dt>Tình trạng:</dt>
                                                    <dd><%#Eval("TinhTrang") %></dd>

                                                    <dt>Product Code:</dt>
                                                    <dd>No. CtAw9458</dd>

                                                    <dt>Hãng sản xuất:</dt>
                                                    <dd>
                                                        <%#Eval("MaHangSX") %></dd>
                                                </dl>
                                            </div>
                                            <!--end product-info-->
                                            <div class="product-inputs">
                                                <div class="input-append">
                                                    <asp:TextBox ID="txtquantity" name="txtquantity" runat="server" Text="1" placeholder="Nhập số lượng" class="span2 txtquantity"></asp:TextBox>
                                                    <asp:Button ID="btnAddCart" class="btn btn-primary" runat="server" Text="Đặt Hàng" CommandName="AddCart" CommandArgument='<%#Eval("MaDienThoai") %>' />
                                                </div>
                                            </div>
                                            <!--end product-inputs-->
                                        </div>
                                        <!--end product-set-->
							</div><!--end span4-->
                            </ItemTemplate>
                            </asp:Repeater>
						</div><!--end product-details-->

					</div><!--end row-->

                    <asp:Repeater ID="rpthongsokt" runat="server">
                        <ItemTemplate>
                            <div class="product-tab">
                                <ul class="nav nav-tabs">
                                    <li class="active">
                                        <a href="#descraption" data-toggle="tab">Mô tả sản phẩm</a>
                                    </li>
                                </ul>
                                <div class="tab-content">

                                    <div class="tab-pane active" id="descraption">
                                        <asp:Literal ID="Literal1" runat="server" Text='<%#Eval("MoTaSanPham") %>'></asp:Literal>

                                    </div>
                                </div>
                                <!--end tab-content-->
                            </div>
                            <!--end product-tab-->
                        </ItemTemplate>
                    </asp:Repeater>

					<div class="related-product">
						<div class="titleHeader clearfix">
							<h3>Sản phẩm cùng hãng</h3>
						</div><!--end titleHeader-->

						<div class="row">
						<ul class="hProductItems clearfix">
                            <asp:Repeater ID="rpSPcunghang" runat="server">
                                <ItemTemplate>
                                    <li class="span3 clearfix">
                                        <div class="thumbnail">
                                            <a href="ChiTietSanPham.aspx?MaSP=<%#Eval("MaDienThoai") %>">
                                                <img style="width: 212px; height: 192px;" src="/Content/HinhSanPham/<%#Eval("HinhDaiDien") %>" alt=""></a>
                                        </div>
                                        <div class="thumbSetting">
                                            <div class="thumbTitle">
                                                <a href="ChiTietSanPham.aspx?MaSP=<%#Eval("MaDienThoai") %>" class="invarseColor"><%#Eval("TenDienThoai") %>
                                                </a>
                                            </div>
                                            <div class="thumbPrice">
                                                <span><%#Eval("Gia","{0:0,0,0}") %>&nbsp;VNĐ</span>
                                            </div>

                                            <div class="thumbButtons">
                                                <button class="btn btn-primary btn-small" data-title="+To Cart" data-placement="top" rel="tooltip">
                                                    <i class="icon-shopping-cart"></i>
                                                </button>
                                                <button class="btn btn-small" data-title="+To WishList" data-placement="top" rel="tooltip">
                                                    <i class="icon-heart"></i>
                                                </button>

                                                <button class="btn btn-small" data-title="+To Compare" data-placement="top" rel="tooltip">
                                                    <i class="icon-refresh"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </li>
                                </ItemTemplate>
                            </asp:Repeater>
						</ul>
						</div><!--end row-->
					</div><!--end related-product-->

				</div><!--end span9-->

			</div><!--end row-->
</asp:Content>
